<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			
		</style>
		<script type="text/javascript">
			function clickme() {
				/*根据标签的id得到对应的标签对象*/
				var input = document.getElementById("inputId");
				/*通过input标签对象的value属性得到输入的值*/
				var value = input.value;
				console.log(value);
				alert(value);
			}
		</script>
	</head>
	<body>
		<input type="text"  id="inputId"/><br/>
		<button onclick="clickme()">点我</button>
	</body>
</html>
